﻿@model Angel.Web.Models.FilterModel
@using Angel.Entities;
@{
    ViewBag.Title = "Users";
}
<html class="mozilla">
<head>  
    <script src="../../Scripts/phantrang.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>
</head>
<body id="jira" class="aui-layout aui-theme-default page-type-admin">
<div id="page">
  <section id="content" role="main">        
    <h1 id="admin-page-heading">Users</h1>
      <div class="content-body aui-panel">
        <div class="content-container">       
            <header>
                <nav class="aui-toolbar">
                    <div class="toolbar-split toolbar-split-right">
                        <ul class="toolbar-group">
                            <li class="toolbar-item">
                                @Html.ActionLink("Invite User","Add","User",new {@class = "toolbar-trigger trigger-dialog",id = "create_user"})
                            </li>
                            <li class="toolbar-item">
                                @Html.ActionLink("Create User","Add","User",new {@class = "toolbar-trigger trigger-dialog",id = "create_user"})
                            </li>
                        </ul>
                    </div>
                 </nav>
              </header>
    @using (Ajax.BeginForm("Index_Filter", new AjaxOptions { UpdateTargetId = "listUser" }))
    {
       <div class="form-body" style="border-bottom: 1px solid #BBBBBB; padding-bottom: 10px;">
             <div class="hidden">
                <input name="atl_token" type="hidden" value="B4MF-F29A-8LXE-JKWJ|2be97953c39fc9790a9dd65bb092987edd7fe08d|lin" />
             </div>
             <h2 style="border-bottom: 1px solid #BBBBBB; padding-bottom: 5px;"> Filter Users</h2>
             <div class="aui-group">
                <div class="aui-item">
                    <div class="field-group">
                        <label for="user-filter-userNameFilter">User Name Contains</label><br />
                        @Html.TextBoxFor(ab => ab.userNameContain, new { @class = "text full-width",id = "user-filter-userNameFilter" })
                       
                    </div>
                </div>
              <div class="aui-item">
                  <div class="field-group">
                      <label for="user-filter-fullNameFilter">Full Name Contains</label><br />
                      @Html.TextBoxFor(ab => ab.fullNameContain, new { @class = "text full-width",id = "user-filter-fullNameFilter" })
                  </div>
              </div>
              <div class="aui-item">
                    <div class="field-group">
                        <label for="user-filter-emailFilter">Email Contains</label><br />
                        @Html.TextBoxFor(ab => ab.emailContain, new { @class = "text full-width",id = "user-filter-emailFilter" }) 
                    </div>
               </div>
               <div class="aui-item">
                    <div class="field-group">
                       <label for="user-filter-group">In Group</label><br />
                       @Html.DropDownListFor(ab => ab.groupId, (SelectList)ViewBag.Groups, new { @class = "select full-width",id = "user-filter-group", style = "width: 180px;height: 20px;" })
                    </div>
               </div>
               <div class="aui-item">
                    <div class="field-group">
                        <label for="user-filter-usersPerPage">Users Per Page</label> <br />
                        @Html.DropDownListFor(ab => ab.count, (SelectList)ViewBag.ListCountFilters, new { @class = "select full-width", @id = "user-filter-usersPerPage", style = "width: 180px;height: 20px;" })
                    </div>
               </div>
        </div>
    </div>
    <br />
    <div class="buttons-container form-footer">
        <div class="buttons">
            <input  accesskey="s" class="button"  id="user-filter-submit" name="" title="Press Alt+Shift+s to submit this form" type="submit" value="Filter" style="width: 80px;height: 25px;"/>
            @Html.ActionLink("Reset Filter", "Index", "User")
        </div>
    </div>
    }
   <div class="form-content">
		<div id = "listUser">
             @{Html.RenderPartial("Filtered", Model.list);}
        </div>
   </div>     
</div>
</div>
</section>
</div>
</body>
</html>



